Optimal. Leaf size=51 \[ \frac {1}{10} \left (5+3 \sqrt {5}\right ) \log \left (3-\sqrt {5}+2 x\right )+\frac {1}{10} \left (5-3 \sqrt {5}\right ) \log \left (3+\sqrt {5}+2 x\right ) \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.02, antiderivative size = 51, normalized size of antiderivative = 1.00, number of steps
used = 3, number of rules used = 2, integrand size = 14, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.143, Rules used = {646, 31}
\begin {gather*} \frac {1}{10} \left (5+3 \sqrt {5}\right ) \log \left (2 x-\sqrt {5}+3\right )+\frac {1}{10} \left (5-3 \sqrt {5}\right ) \log \left (2 x+\sqrt {5}+3\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 31
Rule 646
Rubi steps
\begin {align*} \int \frac {3+x}{1+3 x+x^2} \, dx &=-\left (\frac {1}{10} \left (-5+3 \sqrt {5}\right ) \int \frac {1}{\frac {3}{2}+\frac {\sqrt {5}}{2}+x} \, dx\right )+\frac {1}{10} \left (5+3 \sqrt {5}\right ) \int \frac {1}{\frac {3}{2}-\frac {\sqrt {5}}{2}+x} \, dx\\ &=\frac {1}{10} \left (5+3 \sqrt {5}\right ) \log \left (3-\sqrt {5}+2 x\right )+\frac {1}{10} \left (5-3 \sqrt {5}\right ) \log \left (3+\sqrt {5}+2 x\right )\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.02, size = 49, normalized size = 0.96 \begin {gather*} \frac {1}{10} \left (5+3 \sqrt {5}\right ) \log \left (-3+\sqrt {5}-2 x\right )+\frac {1}{10} \left (5-3 \sqrt {5}\right ) \log \left (3+\sqrt {5}+2 x\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.76, size = 29, normalized size = 0.57
method | result | size |
default | \(\frac {\ln \left (x^{2}+3 x +1\right )}{2}-\frac {3 \sqrt {5}\, \arctanh \left (\frac {\left (2 x +3\right ) \sqrt {5}}{5}\right )}{5}\) | \(29\) |
risch | \(\frac {\ln \left (3+2 x -\sqrt {5}\right )}{2}+\frac {3 \ln \left (3+2 x -\sqrt {5}\right ) \sqrt {5}}{10}+\frac {\ln \left (3+2 x +\sqrt {5}\right )}{2}-\frac {3 \ln \left (3+2 x +\sqrt {5}\right ) \sqrt {5}}{10}\) | \(56\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.48, size = 39, normalized size = 0.76 \begin {gather*} \frac {3}{10} \, \sqrt {5} \log \left (\frac {2 \, x - \sqrt {5} + 3}{2 \, x + \sqrt {5} + 3}\right ) + \frac {1}{2} \, \log \left (x^{2} + 3 \, x + 1\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 4.21, size = 49, normalized size = 0.96 \begin {gather*} \frac {3}{10} \, \sqrt {5} \log \left (\frac {2 \, x^{2} - \sqrt {5} {\left (2 \, x + 3\right )} + 6 \, x + 7}{x^{2} + 3 \, x + 1}\right ) + \frac {1}{2} \, \log \left (x^{2} + 3 \, x + 1\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A]
time = 0.04, size = 49, normalized size = 0.96 \begin {gather*} \left (\frac {1}{2} + \frac {3 \sqrt {5}}{10}\right ) \log {\left (x - \frac {\sqrt {5}}{2} + \frac {3}{2} \right )} + \left (\frac {1}{2} - \frac {3 \sqrt {5}}{10}\right ) \log {\left (x + \frac {\sqrt {5}}{2} + \frac {3}{2} \right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 1.20, size = 42, normalized size = 0.82 \begin {gather*} \frac {3}{10} \, \sqrt {5} \log \left (\frac {{\left | 2 \, x - \sqrt {5} + 3 \right |}}{{\left | 2 \, x + \sqrt {5} + 3 \right |}}\right ) + \frac {1}{2} \, \log \left ({\left | x^{2} + 3 \, x + 1 \right |}\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.12, size = 36, normalized size = 0.71 \begin {gather*} \ln \left (x-\frac {\sqrt {5}}{2}+\frac {3}{2}\right )\,\left (\frac {3\,\sqrt {5}}{10}+\frac {1}{2}\right )-\ln \left (x+\frac {\sqrt {5}}{2}+\frac {3}{2}\right )\,\left (\frac {3\,\sqrt {5}}{10}-\frac {1}{2}\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________